package com.gitee.utils

import java.util.Properties

import org.apache.kafka.clients.consumer.ConsumerConfig

object KafkaConsumerProps {
  def getProperties() = {
    val prop = new Properties()

    prop.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, GlobalConfigUtil.`kafka.bootstrap.servers`)
    prop.setProperty(ConsumerConfig.GROUP_ID_CONFIG, GlobalConfigUtil.`kafka.group.id`)
    prop.setProperty(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, GlobalConfigUtil.`kafka.key.deserializer`)
    prop.setProperty(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, GlobalConfigUtil.`kafka.value.deserializer`)
    prop.setProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, GlobalConfigUtil.`kafka.auto.offset.reset`)
    prop.setProperty("kafka.flink.partition-discovery.interval-millis", GlobalConfigUtil.`kafka.flink.partition-discovery.interval-millis`)

    prop
  }
}
